﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/MainMaster.Master" Inherits="System.Web.Mvc.ViewPage<CoVanHocTapData.Entities.MonHocDangKy>" %>

<%@ Import Namespace= "CoVanHocTapProject.Extends" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Đăng ký kế hoạch học tập
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

<link href="../../CSS/stylesheets/jquery.tooltip/jquery.tooltip.css" rel="stylesheet" type="text/css" />
<script src="../../CSS/javascripts/jquery.min.js" type="text/javascript"></script>    
<script src="../../CSS/javascripts/jquery.tooltip.js" type="text/javascript"></script>  




<style type="text/css">
       
      div.item { vertical-align:middle;  background-color: #56738F; text-align:center;  color:White }
      
    </style>

<script type="text/javascript">
    $j = jQuery.noConflict();
    $j(document).ready(function () {
        $j("div.item").tooltip().css({ opacity: 0.9 });
    });
    </script>
   
   <!--dialog-->
<link href="../../CSS/dialog/jquery.toastmessage.css" rel="stylesheet" type="text/css" />
<script src="../../CSS/dialog/jquery-1.5.min.js" type="text/javascript"></script>    
    <script src="../../CSS/dialog/jquery.toastmessage.js" type="text/javascript"></script>

   

<br />
<label style="font-weight:bold; font-size:15px; font-family:Arial">Các môn đã đăng ký</label>
<hr />
<script>
         <%=Model.ViewStickMHNenDangKy %>
    </script>

    <%if(Model.DoKhoMonHoc!="") {%>  
    <script>
        <%= Model.DoKhoMonHoc %>
        </script> 
    <%} %>

<% if(Model.MonHocKhongDuocDangKy!="") {%>
    <script>

        <%= Model.MonHocKhongDuocDangKy %>
       
    </script>      
    
    
                    <%--<script type="text/javascript">
                        String stringMonHoc = Model.MonHocKhongDuocDangKy;
                        $(document).ready(function showStickyErrorToast() {
                            $().toastmessage('showToast', {
                                text: 'Không được đăng ký',
                               sticky: true,
                                position: 'middle',
                                type: 'error',
                                closeText: '',
                                close: function () {
                                    console.log("toast is closed ...");
                                }
                            });
                        });
                        
   </script>--%>
                   
    <%} %>

<% if (Model.MonHocSVDangKy == null || Model.MonHocSVDangKy.Count==0)
   {%>
    
    
    <label style="font-size:15px">Bạn chưa đăng ký môn học nào</label>
    
    <br />
    <%if(Model.ErrorDangKySoLuongVuotToiDa!="" || Model.ErrorDangKySoLuongThapToiThieu!="") {%>
    <b style="font-size:15px; font-family:Arial; color:Red; margin-left:10"><%= Model.ErrorDangKySoLuongVuotToiDa%></b>    
    <b style="font-size:15px; font-family:Arial; color:Red; margin-left:10"><%= Model.ErrorDangKySoLuongThapToiThieu%></b>    
    <%} %>
<%}
   else
   {%>
    <%if(Model.ErrorDangKySoLuongVuotToiDa!="" || Model.ErrorDangKySoLuongThapToiThieu!="") {%>
        <b style="font-size:15px; font-family:Arial; color:Red; margin-left:10"><%= Model.ErrorDangKySoLuongVuotToiDa%></b>    
        <b style="font-size:15px; font-family:Arial; color:Red; margin-left:10"><%= Model.ErrorDangKySoLuongThapToiThieu%></b>    
    <%} %>
    <br />
    <%int j = 1; %>
        <table cellpadding=0 cellspacing=0 width=90% style="font-size:14px; ">
            <tr style="background-color:#507CD1; color:White; height:25px; " >
                 <th style="width:150px; text-align:center">Mã môn học</th>                                            
                <th style="width:450px;text-align:left">Tên môn học</th>
                <th style="white-space:150px;text-align:center">Số TC</th>
                <th style="width:200px"></th>
            </tr>
            <%foreach (var item in Model.MonHocSVDangKy)
              {%>
                <%if (j % 2 != 0)
                  {%>
                <tr style="background-color:#DDDDDD">
                <%}
                  else
                  { %>
                  <tr>
                <%} %>
                    <td style="text-align:center" ><%= item.MonHocID %></td>
                    <td style="text-align:left" ><%=item.TenMonHoc %></td>
                    <td style="text-align:center" ><%= item.SoDVHocTap %></td>
                    <td><%= Html.ActionImage("HuyMonDangKy", "KeHoachHocTap", new { Id = item.MonHocID.ToString() }, "../../images/DeleteRed.png", "HuyMon")%></td>
                </tr>
                <% j++; %>
            <%} %>
        </table>
<%} %>
<br />

<br />
<label style="font-weight:bold; font-size:15px; font-family:Arial">Chuyên ngành</label> 
<label style="font-weight:bold; font-size:15px; font-family:Arial"><%=CoVanHocTapProject.Infrastructure.Publics.sinhVienDangNhap.Lop.NganhDaoTao.TenNganh %></label>
<hr />
<br />
<%int i = 1;%>
<table cellpadding=0 cellspacing=0 width=98% style="font-size:14px; ">
    <tr style="background-color:#5D7B9D; color:White; height:25px; " >
         <th style="width:150px; text-align:center">Mã môn học</th>                                            
        <th style="width:350px;text-align:left">Tên môn học</th>
        <th style="white-space:150px;text-align:center">Số TC</th>
        <th style="width:200px"></th>
    </tr>
    <%foreach (var item in Model.MonHocCTDT)
      {%>
        <%if (i % 2 != 0)
          {%>
             <tr style="background-color:#D1DDF1; height:18px">
        <%} else{%>
        <tr style="height:18px">
        <%} %>
                <td style="text-align:center" >
                    <%if (!String.IsNullOrEmpty(item.MonHocSongHanh))
                      {%>
                        <div class="item" >
                            <b><%= item.MonHocID%></b>          
                            
                            <div class="tooltip_description" style="display:none; font-size:14px"
                            title="Môn học song hành"><%=item.MonHocSongHanh%>
                                <%= item.GoiY %>
                            </div>
                        </div>
                        
                      <%} %>
                      <%else if (!String.IsNullOrEmpty(item.MonHocTienQuyet))
{%>
                                <div class="item">
                                <b ><%= item.MonHocID%></b>
                                
                                <div class="tooltip_description" style="display:none; font-size:14px" 
                                title="Môn học tiên quyết"><%=item.MonHocTienQuyet%>
                                
                                    <%= item.GoiY %>
                                </div>
                                </div>
                        <%} %>
                        <%else if (!String.IsNullOrEmpty(item.MonHocTruoc))
    {%>
                            
                                <div class="item">
                                    <b ><%= item.MonHocID%></b>
                                
                                    <div class="tooltip_description" style="display:none; font-size:14px" 
                                title="Môn học trước"><%=item.MonHocTruoc%>
                                        <%= item.GoiY %>
                                </div>
                            </div>
                            
                        <%}
                            else if (!String.IsNullOrEmpty(item.GoiY))
                            {%>
                                <div class="item">
                                    <b ><%= item.MonHocID%></b>
                                
                                    <div class="tooltip_description" style="display:none; font-size:14px" 
                                title="Quy định môn học <%= item.TenMonHocDacBiet %>"> 
                                        <%= item.GoiY %>
                                </div>
                            </div>
                        <%} %>
                        <%else
                            {%>
                            <div>
                                    <b><%= item.MonHocID%></b>                                    
                            </div>
                            <%} %>
                
                </td>
                <td style="text-align:left" ><%=item.TenMonHoc %></td>
                <td style="text-align:center" ><%= item.SoDVHocTap %></td>
                <td style="height:18px">
                
                    <%= Html.ActionImage("DangKy", "KeHoachHocTap", new { Id = item.MonHocID.ToString() }, "../../images/RegistVI.png", "DangKy")%>
                    <%= Html.ActionImage("DanhGiaDoKho", "KeHoachHocTap", new { Id = item.MonHocID.ToString() }, "../../images/DoKho.png", "DoKho")%>
                </td>
                
            </tr>
            <% i++;%>
    <%} %>
   
</table>
<br /><br />

    
</asp:Content>
